package com.example.openplaydemo;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import android.view.SurfaceHolder;

public class OpenVideoView extends GLSurfaceView implements SurfaceHolder.Callback {
    public OpenVideoView(Context context) {
        super(context);
    }

    public OpenVideoView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        //super.surfaceCreated(holder);
        InitVideoVView(holder.getSurface()); //tag v0.0.6

        //InitOpVideoView(holder.getSurface());

        //adapter system
//        setRenderer((Renderer) this);
//        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        //super.surfaceChanged(holder, format, w, h);
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
        //super.surfaceDestroyed(holder);
    }

    public native void InitVideoVView(Object surface);

}
